/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #091326, #0f2544, #0a1b33, #072b28);
    background-size: 400% 400%;
    animation: gradientBG 14s ease infinite;
    color: #f1f5f9;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.8rem 2rem;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.8rem;
}

.logo {
    color: #38bdf8;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 1px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.logo:hover {
    color: #7dd3fc;
    transform: scale(1.03);
}

.top-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(52, 211, 153, 0.5);
    color: #6ee7b7;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
    animation: dotPulse 1.8s infinite;
}

@keyframes dotPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
    70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Layout */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 3.2rem;
    align-items: flex-start;
}

.left-side {
    flex: 1.15;
    min-width: 310px;
    animation: slideInLeft 0.9s ease-out;
}

.right-side {
    flex: 0.85;
    min-width: 320px;
    position: sticky;
    top: 1.5rem;
    animation: slideInRight 0.9s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Typography & Hero */
.eyebrow-badge {
    display: inline-block;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.2), rgba(16, 185, 129, 0.2));
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #bae6fd;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

h2 {
    font-size: 2.35rem;
    margin-bottom: 0.6rem;
    line-height: 1.2;
    color: #ffffff;
}

.highlight-text {
    background: linear-gradient(90deg, #38bdf8, #34d399, #fbbf24, #38bdf8);
    background-size: 250% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    animation: textShine 5s linear infinite;
}

@keyframes textShine {
    0% { background-position: 0% center; }
    100% { background-position: 250% center; }
}

.subtitle {
    font-size: 1.12rem;
    color: #cbd5e1;
    margin-bottom: 1.4rem;
}

.subtitle strong {
    color: #6ee7b7;
}

.mt-2 {
    margin-top: 1.5rem;
}

/* HERO IMAGE ANIMATION */
.hero-image {
    width: 100%;
    max-width: 640px;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(56, 189, 248, 0.25);
    margin: 1.2rem 0 1.4rem;
    border: 2px solid rgba(56, 189, 248, 0.45);
    display: block;
}

.floating {
    animation: float 4.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Guarantees Grid */
.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.g-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.guarantee-item strong {
    display: block;
    color: #ffffff;
    font-size: 0.98rem;
}

.guarantee-item small {
    color: #a7f3d0;
    font-size: 0.82rem;
}

/* ELENCO PRODOTTI ANIMATO */
.products-list-container {
    background: rgba(15, 23, 42, 0.68);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-left: 4px solid #38bdf8;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.products-list-container h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.animated-list {
    list-style: none;
    padding: 0;
}

.animated-list li {
    padding: 0.75rem 0.8rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transform: translateX(-20px);
    opacity: 0;
    animation: slideInList 0.5s forwards;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    transition: transform 0.25s ease, background 0.25s ease;
}

.animated-list li:hover {
    transform: translateX(6px);
    background: rgba(56, 189, 248, 0.1);
}

.animated-list li.featured-service {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.16), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.service-icon {
    font-size: 1.35rem;
    line-height: 1.2;
}

.animated-list li strong {
    display: block;
    color: #f8fafc;
    font-size: 1.02rem;
}

.animated-list li.featured-service strong {
    color: #7dd3fc;
}

.service-desc {
    display: block;
    font-size: 0.86rem;
    color: #94a3b8;
}

/* Sequential delay */
.animated-list li:nth-child(1) { animation-delay: 0.2s; }
.animated-list li:nth-child(2) { animation-delay: 0.35s; }
.animated-list li:nth-child(3) { animation-delay: 0.5s; }
.animated-list li:nth-child(4) { animation-delay: 0.65s; }
.animated-list li:nth-child(5) { animation-delay: 0.8s; }
.animated-list li:nth-child(6) { animation-delay: 0.95s; }

@keyframes slideInList {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slogan Box */
.slogan-box {
    background: rgba(15, 23, 42, 0.75);
    padding: 1.35rem 1.5rem;
    border-radius: 14px;
    border: 1px solid #0ea5e9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slogan-box.highlight {
    background: linear-gradient(45deg, rgba(14, 165, 233, 0.16), rgba(16, 185, 129, 0.16));
}

.pulse-border {
    animation: pulseBorder 2.8s infinite;
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
    70% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* =========================================================
   FORM CON COLORI ANIMATI E MOVIMENTO ATTRATTIVO
   ========================================================= */
.form-animated-shell {
    position: relative;
    padding: 4px;
    border-radius: 24px;
    background: linear-gradient(
        120deg,
        #0284c7,
        #38bdf8,
        #10b981,
        #f59e0b,
        #06b6d4,
        #0284c7
    );
    background-size: 300% 300%;
    animation:
        borderFlow 4.5s ease infinite,
        formAttract 3.8s ease-in-out infinite;
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.45),
        0 0 32px rgba(56, 189, 248, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Glow esterno pulsante che richiama lo sguardo */
.form-animated-shell::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 28px;
    background: linear-gradient(120deg, #0ea5e9, #10b981, #fbbf24, #38bdf8);
    background-size: 300% 300%;
    filter: blur(16px);
    opacity: 0.55;
    z-index: -1;
    animation: borderFlow 4.5s ease infinite, glowBreath 3s ease-in-out infinite;
}

/* Quando il cliente interagisce o scrive, il movimento si ferma per comodità */
.form-animated-shell:hover,
.form-animated-shell:focus-within {
    animation: borderFlow 4.5s ease infinite;
    transform: translateY(-2px) scale(1.005);
    box-shadow:
        0 24px 55px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(16, 185, 129, 0.55);
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes formAttract {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    45% {
        transform: translateY(-7px) scale(1.012);
    }
    55% {
        transform: translateY(-5px) scale(1.012) rotate(0.35deg);
    }
    65% {
        transform: translateY(-6px) scale(1.01) rotate(-0.35deg);
    }
}

@keyframes glowBreath {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.form-card {
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 60%, #ecfdf5 100%);
    padding: 2rem 2rem 1.8rem;
    border-radius: 20px;
    color: #0f172a;
    position: relative;
    overflow: hidden;
}

/* Fascia superiore colorata animata nel form */
.form-ribbon {
    background: linear-gradient(90deg, #0284c7, #059669, #0284c7);
    background-size: 200% auto;
    animation: borderFlow 3.5s linear infinite;
    color: #ffffff;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}

.form-header {
    margin-bottom: 1.15rem;
}

.form-header h3 {
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 900;
    margin-bottom: 0.3rem;
}

.form-header p {
    font-size: 0.9rem;
    color: #334155;
}

.pointer-bounce {
    display: inline-block;
    animation: pointDown 1.3s ease-in-out infinite;
}

@keyframes pointDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* Pulsanti selezione rapida */
.quick-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.15rem;
}

.topic-chip {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
    border-radius: 999px;
    padding: 0.35rem 0.72rem;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.topic-chip:hover,
.topic-chip.active {
    background: linear-gradient(90deg, #0284c7, #059669);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-1px);
}

.form-group {
    margin-bottom: 1.05rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.78rem 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.98rem;
    font-family: inherit;
    color: #0f172a;
    background-color: #ffffff;
    transition: all 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.22);
    background-color: #ffffff;
}

/* Pulsante Invio con Gradiente Animato e Effetto Luce */
.btn-primary {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 1.05rem 1.2rem;
    background: linear-gradient(90deg, #0284c7, #059669, #0ea5e9, #0284c7);
    background-size: 250% 100%;
    animation: borderFlow 3.5s ease infinite;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.35);
}

/* Riflesso luminoso scorrevole sul bottone */
.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
    transform: skewX(-22deg);
    animation: btnShine 2.8s infinite;
}

@keyframes btnShine {
    0% { left: -120%; }
    45%, 100% { left: 160%; }
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 12px 26px rgba(2, 132, 199, 0.45);
}

.btn-primary:disabled {
    background: #94a3b8;
    animation: none;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary .arrow {
    display: inline-block;
    font-size: 1.2rem;
    animation: arrowMove 1.4s ease-in-out infinite;
}

@keyframes arrowMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

.form-footer-badges {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #047857;
}

.privacy-notice {
    font-size: 0.74rem;
    color: #475569;
    text-align: center;
    margin-top: 0.55rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

#histats_counter {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 860px) {
    .container {
        padding: 1.25rem;
    }

    .content-wrapper {
        flex-direction: column;
        gap: 2.2rem;
    }

    .right-side {
        position: static;
        width: 100%;
    }

    .left-side {
        width: 100%;
    }

    h2 {
        font-size: 1.85rem;
    }

    .guarantees-grid {
        grid-template-columns: 1fr;
    }
}