@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600;1,700&display=swap');

body, html { overflow-x: hidden; width: 100%; position: relative; overscroll-behavior-x: none; }

:root {
    --pulsee-dark: #0f1115;
    --pulsee-dark-card: #1c1f26;
    --pulsee-neon: #d4ff00;
    --pulsee-light: #f4f5f7;
    --pulsee-white: #ffffff;
    --radius-sm: 16px;
    --radius-md: 32px;
    --radius-lg: 48px;
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* Colori testo ad alto contrasto per nitidezza HD */
    --pulsee-text: #171a21;
    --pulsee-muted: #38404e;
    --pulsee-heading: #0a0d14;
    --bs-body-color: #171a21;
    --bs-secondary-color: #38404e;
    --bs-body-font-family: var(--font-main);
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--pulsee-light);
    color: var(--pulsee-text);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    overflow-x: hidden;
}

/* Leggibilità testi secondari e paragrafi in HD */
p {
    color: var(--pulsee-text);
    line-height: 1.72;
    margin-bottom: 1rem;
}
.text-muted { color: var(--pulsee-muted) !important; font-weight: 450; }
/* Ripristino font-weight per icone Font Awesome quando usate con classi utility come text-muted */
.fa, .fas, .fa-solid, [class*="fa-solid"], i[class*="fa-"] { font-weight: 900 !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.85) !important; }
.text-white { color: #ffffff !important; }
.small, small { line-height: 1.58; font-size: 0.92rem; }

/* Tipografia titoli: spaziature proporzionali per massima nitidezza ed evitare sovrapposizioni */
h1, .display-1, .display-2, .display-3, .display-4 {
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.18;
}
h2, .display-5 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.24;
}
h3, .display-6 {
    font-weight: 750;
    letter-spacing: -0.015em;
    line-height: 1.28;
}
h4 {
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.34;
}
h5 {
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1.38;
}
h6 {
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.4;
}

/* Colore predefinito dei titoli su sfondi chiari */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    color: var(--pulsee-heading);
}

/* ==========================================================================
   CONTESTI SCURI (Hero, Footer, Bento Dark, Info Help, card scure, text-white, bg-dark)
   I TITOLI E TITOLETTI DEVONO SEMPRE ESSERE BIANCHI (#ffffff) O VERDE INNOVA
   ========================================================================== */
.hero-pulsee,
.footer-pulsee,
.bento-dark,
.info-help,
.text-white,
.bg-dark {
    color: #ffffff !important;
}

/* Titoli e titoletti in TUTTI i contesti scuri: sempre BIANCO PURO (#ffffff) */
.hero-pulsee h1, .hero-pulsee h2, .hero-pulsee h3, .hero-pulsee h4, .hero-pulsee h5, .hero-pulsee h6,
.hero-pulsee .h1, .hero-pulsee .h2, .hero-pulsee .h3, .hero-pulsee .h4, .hero-pulsee .h5, .hero-pulsee .h6,
.hero-pulsee .display-1, .hero-pulsee .display-2, .hero-pulsee .display-3, .hero-pulsee .display-4,
.hero-pulsee .display-5, .hero-pulsee .display-6,
.footer-pulsee h1, .footer-pulsee h2, .footer-pulsee h3, .footer-pulsee h4, .footer-pulsee h5, .footer-pulsee h6,
.footer-pulsee .h1, .footer-pulsee .h2, .footer-pulsee .h3, .footer-pulsee .h4, .footer-pulsee .h5, .footer-pulsee .h6,
.footer-pulsee .footer-heading,
.footer-heading,
.bento-dark h1, .bento-dark h2, .bento-dark h3, .bento-dark h4, .bento-dark h5, .bento-dark h6,
.bento-dark .h1, .bento-dark .h2, .bento-dark .h3, .bento-dark .h4, .bento-dark .h5, .bento-dark .h6,
.info-help h1, .info-help h2, .info-help h3, .info-help h4, .info-help h5, .info-help h6,
.info-help .h1, .info-help .h2, .info-help .h3, .info-help .h4, .info-help .h5, .info-help .h6,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
.text-white .h1, .text-white .h2, .text-white .h3, .text-white .h4, .text-white .h5, .text-white .h6,
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.bg-dark .h1, .bg-dark .h2, .bg-dark .h3, .bg-dark .h4, .bg-dark .h5, .bg-dark .h6 {
    color: #ffffff !important;
}

/* Testi, lead e paragrafi nei contesti scuri: bianco nitido ad alto contrasto */
.hero-pulsee p, .hero-pulsee .lead, .hero-pulsee p.lead,
.footer-pulsee p, .footer-pulsee small, .footer-pulsee .small,
.footer-pulsee div.small,
.bento-dark p,
.info-help p,
.text-white p,
.bg-dark p {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* Opacità attenuate nei contesti scuri: garantisce massima leggibilità */
.hero-pulsee .opacity-75,
.hero-pulsee .opacity-90,
.hero-pulsee .text-white-50 {
    opacity: 0.95 !important;
    color: rgba(255, 255, 255, 0.92) !important;
}

/* Verde Innova / Neon per accenti e parole in risalto */
.text-neon,
.hero-pulsee .text-neon,
.footer-pulsee .text-neon,
.bento-dark .text-neon,
.info-help .text-neon {
    color: var(--pulsee-neon) !important;
}

/* Titoletti Footer specifici: bianco nitido e ad altissima visibilità */
.footer-pulsee .footer-heading,
.footer-heading {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* Navbar */
.navbar-pulsee {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 0;
}
.navbar-pulsee .nav-link {
    font-weight: 700;
    color: var(--pulsee-dark);
    padding: 0.5rem 1.2rem;
    font-size: 1.05rem;
}
.navbar-pulsee .nav-link:hover {
    color: #666;
}

/* Buttons */
.btn-pulsee-neon {
    background-color: var(--pulsee-neon);
    color: var(--pulsee-dark);
    font-weight: 800;
    border-radius: 100px;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border: none;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-pulsee-neon:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(212, 255, 0, 0.4);
    color: var(--pulsee-dark);
}

.btn-pulsee-dark {
    background-color: var(--pulsee-dark);
    color: var(--pulsee-white);
    font-weight: 800;
    border-radius: 100px;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border: none;
    transition: transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-pulsee-dark:hover {
    transform: translateY(-4px);
    color: var(--pulsee-white);
    background-color: #000;
}

/* Hero Section con sfumature brand Innova Power (Verde e Blu su sfondo scuro) */
.hero-pulsee {
    background-color: #080b10;
    background-image: 
        radial-gradient(ellipse 70% 60% at 8% 25%, rgba(60, 184, 58, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 75% 65% at 92% 30%, rgba(0, 119, 200, 0.26) 0%, transparent 65%),
        radial-gradient(circle at 50% 100%, rgba(0, 168, 150, 0.15) 0%, transparent 55%),
        linear-gradient(145deg, #07090d 0%, #0c1219 45%, #080d14 100%);
    color: var(--pulsee-white);
    padding: 8rem 0 6rem 0;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.hero-pulsee::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -8%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(60, 184, 58, 0.16) 0%, rgba(60, 184, 58, 0) 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.hero-pulsee::after {
    content: '';
    position: absolute;
    top: 5%;
    right: -6%;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(0, 119, 200, 0.20) 0%, rgba(0, 119, 200, 0) 70%);
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}

.hero-pulsee .container {
    position: relative;
    z-index: 2;
}
.hero-pulsee h1 {
    font-size: 4.5rem;
}
.text-neon {
    color: var(--pulsee-neon);
}

/* Cards (Bento Box) */
.bento-card {
    border-radius: var(--radius-md);
    padding: 3rem;
    height: 100%;
    transition: transform 0.4s ease;
    border: none;
}
.bento-card:hover {
    transform: scale(0.98);
}
.bento-light {
    background: var(--pulsee-white);
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}
.bento-dark {
    background: var(--pulsee-dark-card);
    color: var(--pulsee-white);
}
.bento-neon {
    background: var(--pulsee-neon);
    color: var(--pulsee-dark);
}

/* Scroller Mobile */
@media (max-width: 991px) {
    .hero-pulsee h1 {
        font-size: 3rem;
    }
    .bento-card {
        padding: 2rem;
        border-radius: var(--radius-sm);
    }
    .hero-pulsee {
        border-bottom-left-radius: var(--radius-md);
        border-bottom-right-radius: var(--radius-md);
        padding: 6rem 0 4rem 0;
    }
    
    .scroll-mobile {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
        padding-bottom: 2rem;
        margin-left: calc(var(--bs-gutter-x) * -.5); margin-right: calc(var(--bs-gutter-x) * -.5);
        padding-left: 15px;
        padding-right: 15px;
        gap: 15px;
        -webkit-overflow-scrolling: touch;
    }
    .scroll-mobile::-webkit-scrollbar {
        display: none;
    }
    .scroll-mobile > div {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
}

/* Ticker Marquee */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background-color: var(--pulsee-neon);
    padding: 0.9rem 0;
    box-sizing: border-box;
    cursor: default;
}
.ticker-wrap:hover .ticker {
    animation-play-state: paused;
}
.ticker {
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-name: ticker;
    animation-duration: 65s;
    will-change: transform;
}
.ticker-item {
    display: inline-block;
    padding: 0 1.8rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pulsee-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
@media (max-width: 768px) {
    .ticker {
        animation-duration: 55s;
    }
    .ticker-item {
        font-size: 1.15rem;
        padding: 0 1.2rem;
    }
}
@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Footer */
.footer-pulsee {
    background-color: var(--pulsee-dark);
    color: var(--pulsee-white);
    padding: 5rem 0 2rem 0;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.footer-pulsee a {
    color: #c8d2e2 !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease;
}
.footer-pulsee a:hover {
    color: var(--pulsee-neon) !important;
}
.footer-links {
    list-style: none;
    padding-left: 0;
}
.footer-links li a {
    color: #c8d2e2 !important;
    display: inline-block;
    transition: all 0.2s ease;
}
.footer-links li a:hover {
    color: var(--pulsee-neon) !important;
    transform: translateX(3px);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 3rem;
    padding-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85) !important;
}
.footer-bottom a {
    color: rgba(255,255,255,0.92) !important;
}
.footer-bottom a:hover {
    color: var(--pulsee-neon) !important;
}

/* Card e box assistenza scuri (.info-help) */
.info-help {
    background: var(--pulsee-dark) !important;
    background-color: #0f1115 !important;
    color: #ffffff !important;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.info-help h4, .info-help h5 {
    color: #ffffff !important;
    font-weight: 800 !important;
}
.info-help p {
    color: rgba(255, 255, 255, 0.88) !important;
}
.info-help .btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
    background: transparent !important;
    font-weight: 700;
}
.info-help .btn-outline-light:hover {
    color: var(--pulsee-dark) !important;
    background: #ffffff !important;
    border-color: #ffffff !important;
}

/* Badge Portale Offerte Footer */
.footer-portale-badge {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
}
.footer-portale-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}
.footer-portale-badge img {
    height: 38px;
    width: auto;
    max-width: 190px;
    display: block;
    object-fit: contain;
}


/* --- MOBILE OPTIMIZATION (leggibilità HD) --- */
@media (max-width: 768px) {
    html, body {
        font-size: 16px !important;
    }
    
    /* Tipografia mobile: grande, nitida e ariosa */
    h1, .display-1, .hero-pulsee h1 { font-size: 2.05rem !important; letter-spacing: -0.6px !important; line-height: 1.15 !important; }
    h2, .display-5 { font-size: 1.6rem !important; letter-spacing: -0.4px !important; line-height: 1.2 !important; }
    h3, .display-6 { font-size: 1.35rem !important; letter-spacing: -0.3px !important; line-height: 1.25 !important; }
    h4 { font-size: 1.2rem !important; line-height: 1.3 !important; }
    h5 { font-size: 1.08rem !important; line-height: 1.35 !important; }
    h6 { font-size: 1rem !important; line-height: 1.4 !important; }
    p.lead, .lead { font-size: 1.08rem !important; line-height: 1.55 !important; }
    p { font-size: 1rem !important; line-height: 1.65 !important; margin-bottom: 0.9rem !important; }
    li { line-height: 1.6; }
    .small, small { font-size: 0.9rem !important; line-height: 1.55 !important; }

    /* Compact padding & margin */
    .py-5, .py-4, .py-3 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
    .mb-5, .mb-4 { margin-bottom: 1.25rem !important; }
    .mt-5, .mt-4 { margin-top: 1.25rem !important; }
    .p-5, .p-4 { padding: 1.25rem !important; }
    .p-lg-5 { padding: 1.25rem !important; }

    /* Bento Cards */
    .bento-card {
        padding: 1.25rem !important;
        border-radius: 14px !important;
    }
    .bento-card > i, .bento-card > div > i:only-child {
        font-size: 1.8rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Bottoni */
    .btn-pulsee-neon, .btn-pulsee-dark, .btn-sen-primary, .btn-sen-outline {
        padding: 0.8rem 1.25rem !important;
        font-size: 0.98rem !important;
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        letter-spacing: 0.2px !important;
    }
    .btn { font-size: 0.98rem; }
    .btn i { font-size: 1em !important; margin-bottom: 0 !important; }
    
    /* Hero reduction */
    .hero-pulsee {
        padding: 5rem 0 2rem 0 !important;
        border-bottom-left-radius: 16px !important;
        border-bottom-right-radius: 16px !important;
    }

    /* Scroll mobile snap tighter */
    .scroll-mobile {
        padding-bottom: 1rem !important;
        margin-left: calc(var(--bs-gutter-x) * -.5); margin-right: calc(var(--bs-gutter-x) * -.5);
        padding-left: 15px !important;
        padding-right: 15px !important;
        gap: 8px !important;
    }
    .scroll-mobile > div {
        flex: 0 0 92% !important; /* show just a sliver of next card */
    }

    /* Navbar adjustment */
    .navbar-pulsee .navbar-brand img {
        height: 30px !important;
    }
    .navbar-pulsee {
        padding: 0.25rem 0 !important;
    }
    
    /* Footer compactness */
    .footer-pulsee {
        padding: 2rem 0 1rem 0 !important;
        border-top-left-radius: 16px !important;
        border-top-right-radius: 16px !important;
    }
    .footer-pulsee .footer-heading,
    .footer-heading,
    .footer-pulsee h5,
    .footer-pulsee h6 {
        color: #ffffff !important;
        margin-top: 1.25rem !important;
        margin-bottom: 0.6rem !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
    }
    .footer-bottom {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
    }
    
    /* Icons reduction */
    .fs-1 { font-size: 1.5rem !important; }
    .fs-2 { font-size: 1.3rem !important; }
    .fs-3 { font-size: 1.2rem !important; }
    .fs-4 { font-size: 1.1rem !important; }
}

