:root {
    --bg-dark: #050816;
    --bg-dark-2: #10172b;
    --bg-light: #f6f8fc;
    --text-light: #f8fafc;
    --text-dark: #101828;
    --muted-dark: #a8b3cf;
    --muted-light: #475467;
    --brand: #2bb9ff;
    --brand-2: #7b8cff;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-soft: 0 14px 40px rgba(12, 21, 44, 0.2);
    --shadow-strong: 0 20px 50px rgba(2, 8, 28, 0.45);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    scroll-behavior: smooth;
    background: var(--bg-dark);
}

h1, h2, h3, h4 {
    margin: 0 0 1rem;
    line-height: 1.2;
}

.titolo {
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    text-align: center;
    color: var(--titolo-color, var(--text-light));
    margin-bottom: 1.4rem;
    letter-spacing: -0.025em;
}

.titolo-primario {
    font-size: clamp(2.2rem, 5.2vw, 3.5rem);
}

.titolo2,
.titoloSx,
.titoloDx {
    color: var(--titolo-color, var(--text-light));
}

.titolo2 {
    font-size: 1.1rem;
    text-align: center;
}

.titoloSx, .titoloDx {
    font-size: clamp(1.6rem, 3.5vw, 2.35rem);
}

.testo-centro,
.testo-sinistra,
.testo-destra {
    line-height: 1.75;
    color: var(--testo-color, var(--muted-dark));
}

.testo-centro {
    max-width: 760px;
    margin: 0 auto 1.4rem;
    font-size: clamp(1rem, 1.9vw, 1.16rem);
}

.testo-chi-siamo {
    max-width: 860px;
}

.language-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1300;
}

.language-selector select {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(11, 17, 32, 0.7);
    color: #fff;
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    font-size: 0.88rem;
    backdrop-filter: blur(10px);
}

/* Navigation */
.vertical-menu {
    position: fixed;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    width: 66px;
    padding: 0.6rem 0.45rem;
    border-radius: 18px;
    background: rgba(9, 14, 30, 0.78);
    border: 1px solid rgba(123, 140, 255, 0.18);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    z-index: 1200;
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.vertical-menu.right {
    left: auto;
    right: 0.75rem;
}

.vertical-menu.collapsed .menu-item:not(.toggle-menu) {
    display: none;
}

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0.32rem auto;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.menu-item.menu-link {
    text-decoration: none;
}

.menu-item:hover {
    transform: translateY(-1px);
    background: rgba(43, 185, 255, 0.12);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(43, 185, 255, 0.32), rgba(123, 140, 255, 0.32));
}

.menu-item img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.menu-label {
    position: absolute;
    left: 62px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-radius: 10px;
    padding: 0.4rem 0.62rem;
    font-size: 0.82rem;
    white-space: nowrap;
    font-weight: 600;
}

.menu-item:hover .menu-label {
    opacity: 1;
    transform: translateX(0);
}

/* Sections */
.sfondo-scuro,
.sfondo-chiaro {
    padding: clamp(3.5rem, 8.5vw, 6.2rem) clamp(1.2rem, 4vw, 3rem);
    position: relative;
}

.sfondo-scuro {
    background: radial-gradient(1200px 700px at 75% -10%, rgba(43, 185, 255, 0.15), transparent 45%), linear-gradient(160deg, var(--bg-dark), var(--bg-dark-2));
    --titolo-color: var(--text-light);
    --testo-color: var(--muted-dark);
}

.sfondo-chiaro {
    background: linear-gradient(180deg, #fbfcff 0%, #f2f5fb 100%);
    --titolo-color: #111827;
    --testo-color: var(--muted-light);
}

.home {
    min-height: 100vh;
    background: radial-gradient(1200px 650px at 80% 15%, rgba(123, 140, 255, 0.3), transparent 52%),
        url("image/sfondo1.png") no-repeat center center / cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6.5rem 1.2rem 4rem;
}

.overlay-text {
    width: min(920px, 100%);
    padding: clamp(1.6rem, 4.2vw, 3rem);
    border-radius: 24px;
    text-align: center;
    background: linear-gradient(150deg, rgba(7, 12, 27, 0.82), rgba(10, 20, 45, 0.66));
    border: 1px solid rgba(123, 140, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-strong);
}

.overlay-text img {
    width: min(180px, 42%);
    margin-bottom: 1rem;
}

.overlay-text .testo-centro {
    color: #dbe8ff;
}

.overlay-text a {
    text-decoration: none;
}

button {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.82rem 1.35rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 24px rgba(43, 185, 255, 0.25);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(43, 185, 255, 0.36);
}

.overlay-text button,
.products-eshop-cta button {
    margin: 0.35rem;
}

.service-gallery {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.service-item {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(16, 24, 40, 0.06);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
}

.service-item img {
    width: 100%;
    height: 188px;
    border-radius: 12px;
    object-fit: cover;
}

.service-detail .content {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2.2rem;
}

.service-detail .content > div {
    width: 52%;
}

.service-detail .content img {
    width: 48%;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.contenuto-destra {
    text-align: right;
}

.testo-sinistra, .testo-destra {
    font-size: 1.03rem;
}

.allinea-sinistra button {
    margin-top: 0.45rem;
}

.contenuto-destra button {
    margin-top: 0.45rem;
}

.products-section .product-category {
    max-width: 1040px;
    margin: 0 auto 2.4rem;
}

.product-category-title {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1rem;
    color: #95c5ff;
    margin-bottom: 1.15rem;
}

.product-card {
    border-radius: 14px;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    margin-bottom: 0.9rem;
}

.product-card h4 {
    color: #fff;
}

.product-card p {
    margin: 0;
    color: #d0d8ea;
}

.product-card a {
    color: #7bd2ff;
}

form {
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

form input,
form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #d5deea;
    padding: 0.92rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: #2bb9ff;
    box-shadow: 0 0 0 4px rgba(43, 185, 255, 0.2);
}

footer {
    background: #060b1b;
    color: #9aa8c3;
    padding: 2rem 1rem;
}

.footer-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.footer-content a {
    color: #7bd2ff;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.section.from-right {
    transform: translateX(38px);
}

.section.visible {
    opacity: 1;
    transform: translate(0);
}

@media (max-width: 992px) {
    .service-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-detail .content {
        flex-direction: column;
    }

    .service-detail .content > div,
    .service-detail .content img {
        width: 100%;
    }

    .contenuto-destra {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .vertical-menu {
        top: auto;
        bottom: 0.7rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: calc(100% - 1.2rem);
        max-width: 560px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.35rem 0.3rem;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .vertical-menu::-webkit-scrollbar {
        display: none;
    }

    .vertical-menu.right {
        left: 50%;
        right: auto;
    }

    .vertical-menu.collapsed .menu-item:not(.toggle-menu) {
        display: flex;
    }

    .menu-item {
        width: 44px;
        height: 44px;
        margin: 0;
        flex: 0 0 auto;
    }

    .menu-item img {
        width: 28px;
        height: 28px;
    }

    .menu-label {
        display: none;
    }

    .language-selector {
        top: 0.7rem;
        right: 0.7rem;
    }

    .home {
        padding-top: 5.2rem;
        min-height: 90vh;
    }

    .service-gallery {
        grid-template-columns: 1fr;
    }

    body {
        padding-bottom: 78px;
    }
}
