:root {
    --primary: #5b2b82;
    --secondary: #7a1f24;
    --dark: #1c1c1c;
    --gray: #666;
    --light: #f6f6f6;
    --white: #ffffff;
    --soft-violet: rgba(91, 43, 130, 0.06);
    --soft-red: rgba(122, 31, 36, 0.05);

    /* Varianti per il bot */
    --go-corporate: var(--primary);
    --go-accent: #6f7f72;
    --go-light: var(--light);
    --go-text: var(--dark);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--dark);
    line-height: 1.7;
    background: #fff;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 6%;
}

/* HEADER */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    height: 58px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a {
    margin-left: 30px;
    text-decoration: none;
    font-size: 14px;
    color: var(--dark);
}

.nav-cta {
    color: var(--primary);
    font-weight: 600;
}

/* HERO */
.hero {
    min-height: 100vh;
    background:
        linear-gradient(rgba(91, 43, 130, 0.50),
            rgba(91, 43, 130, 0.65)),
        url("img/hero-logistica.webp") center / cover no-repeat;
    display: flex;
    align-items: center;
    padding-top: 90px;
    color: #fff;
}

.hero-content {
    max-width: 720px;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
}

.hero p {
    margin-top: 20px;
    color: #e6e6e6;
    font-size: 1.05rem;
}

/* Hero pagine interne */
.hero-inner {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 90px;
    color: #fff;
    background-size: cover;
    background-position: center center;
    position: relative;
}

.hero-contatti {
    min-height: 450px;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 14px 34px;
    font-size: 14px;
    text-decoration: none;
    margin-right: 15px;
    border-radius: 30px;
    transition: all 0.25s ease;
}

.btn.primary {
    background: var(--primary);
    color: #fff;
}

.btn.primary:hover {
    background: var(--secondary);
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
}

/* SECTIONS */
.section {
    padding: 120px 0;
}

.section-soft {
    background: var(--soft-violet);
}

.section-light {
    background: #faf9fb;
}

.section-dark {
    background: #111;
    color: #fff;
}

.section-dark p {
    color: #ccc;
}

.section h2 {
    letter-spacing: -0.02em;
}

.section-intro {
    max-width: 700px;
    margin-bottom: 70px;
    color: var(--gray);
    font-size: 1.05rem;
}

/* SERVICES */
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
}

@media (max-width: 1024px) {
    .services {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .services {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.service-card {
    text-decoration: none;
    color: var(--dark);
}

.service-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    margin-bottom: 22px;
    border-radius: 12px;
}

.service-card h3 {
    margin-bottom: 10px;
    transition: color 0.25s ease;
}

.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

.service-card:hover h3 {
    color: var(--primary);
}

/* DICONO DI NOI */
.quotes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 70px;
    margin-top: 60px;
}

blockquote {
    margin: 0;
    padding: 40px 45px;
    background: linear-gradient(135deg,
            var(--soft-violet),
            var(--soft-red));
    border-radius: 18px;
}

blockquote p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--dark);
    font-style: italic;
}

blockquote footer {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

blockquote footer img {
    height: 34px;
    opacity: 0.75;
}

.quote-author strong {
    display: block;
    font-size: 0.95rem;
    color: var(--primary);
}

.quote-author span {
    font-size: 0.85rem;
    color: var(--gray);
}

@media (max-width: 768px) {
    .quotes {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* METHOD */
.method {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
}

.method h3 {
    margin-bottom: 8px;
}

.method p {
    color: #555;
}

.method-image {
    display: block;
    max-width: 560px;
    margin: 70px auto 0;
    opacity: 0.85;
}

/* BROCHURE */
.brochure {
    display: flex;
    align-items: center;
    gap: 70px;
    flex-wrap: wrap;
}

.brochure img {
    max-width: 260px;
    border-radius: 10px;
}

/* FORM */
.contact-form {
    max-width: 520px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: none;
    border-radius: 6px;
}

.contact-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 34px;
    cursor: pointer;
    border-radius: 30px;
}

.contact-form button:hover {
    background: var(--secondary);
}

/* FOOTER */
.site-footer {
    background: #0d0d0d;
    color: #f5f5f5;
    padding: 45px 0;
    font-size: 13px;
}

.site-footer a {
    color: #f8f6f6;
    text-decoration: none;
}

/* PAGINA CONTATTI */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 50px;
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.contact-form-wrapper {
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 6px rgba(91, 43, 130, 0.3);
}

.contact-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 36px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: var(--secondary);
}

/* INFO E MAPPA */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--dark);
}

.contact-item i {
    font-size: 20px;
    color: var(--primary);
}

.contact-item a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-item address {
    font-style: normal;
    line-height: 1.5;
}

.map-container {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

/* HEADER RESPONSIVE */
.menu-toggle {
    display: none;
    font-size: 30px;
    cursor: pointer;
    user-select: none;
    padding: 10px;
}

@media (max-width: 768px) {
    .header-inner {
        height: 80px;
        padding: 0 6%;
    }

    .logo {
        height: 40px;
    }

    .logo-text {
        font-size: 18px;
    }

    .menu-toggle {
        display: block !important;
    }

    nav {
        display: none !important;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        z-index: 1000;
        border-bottom: 2px solid var(--primary);
    }

    nav.active {
        display: flex !important;
    }

    nav a {
        margin: 15px 0 !important;
        margin-left: 0 !important;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
}

/* ======================================== */
/* ============ BOT GOLOGISTICS =========== */
/* ======================================== */

/* Launcher e Logo */
.gobot-launcher {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.gobot-launcher:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gobot-launcher img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

/* Fumetto d'invito (Tooltip) */
.gobot-tooltip {
    position: fixed;
    bottom: 100px;
    right: 25px;
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 9998;
    animation: bubbleAppear 0.5s ease-out;
    pointer-events: none;
}

.gobot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: var(--primary) transparent transparent;
}

@keyframes bubbleAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Finestra Chat */
.gobot-window {
    position: fixed;
    bottom: 105px;
    right: 25px;
    width: 380px;
    max-width: 90vw;
    height: 500px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 10000;
    border: 1px solid #e0e0e0;
    font-family: sans-serif;
}

.gobot-window.active {
    display: flex;
    animation: goAppear 0.3s ease-out;
}

@keyframes goAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Chat */
.gobot-header {
    background: var(--primary);
    color: #fff;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gobot-header span:first-child {
    font-weight: bold;
}

.gobot-header span:last-child {
    cursor: pointer;
    font-size: 20px;
}

/* Body Chat */
.gobot-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: var(--light);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Messaggi */
.gobot-msg {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: 85%;
    word-wrap: break-word;
}

.gobot-msg.bot {
    background: var(--white);
    border: 1px solid #dee2e6;
    align-self: flex-start;
}

.gobot-msg.user {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
}

/* Footer Chat */
.gobot-footer {
    padding: 10px;
    background: var(--white);
    border-top: 1px solid #eee;
    display: flex;
    gap: 5px;
}

#gobot-input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    outline: none;
}

#gobot-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--soft-violet);
}

.gobot-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gobot-btn:hover {
    background: var(--secondary);
}

/* Pulsante WhatsApp */
.wa-link-bot {
    display: block;
    background: #25d366;
    color: white !important;
    text-align: center;
    padding: 8px;
    margin-top: 5px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.wa-link-bot:hover {
    background: #128C7E;
}

/* Responsive per il bot */
@media (max-width: 480px) {
    .gobot-window {
        width: 90vw;
        height: 70vh;
        bottom: 90px;
        right: 5vw;
    }

    .gobot-launcher {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }

    .gobot-tooltip {
        bottom: 85px;
        right: 15px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 150px;
    /* sopra il bot */
    right: 25px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 11000;
    /* sopra tutto */
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--secondary);
    transform: translateY(-4px);
}