:root {
    --primary: #1a1a1a;
    --secondary: #2d2d2d;
    --accent: #ff4d29;
    /* Red-Orange from Innhova */
    --accent-hover: #e63e19;
    --text-light: #ffffff;
    --text-dark: #333333;
    --text-muted: #a0a0a0;
    --bg-light: #f8f9fa;
    --bg-dark: #121212;
    --glass: rgba(255, 255, 255, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-light);
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 1.5rem 2rem;
}

header.scrolled {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

header.scrolled .nav-links a {
    color: var(--text-dark);
}

header.scrolled .logo img {
    height: 40px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo img {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    margin-right: 3rem;
}

.nav-links a {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

header.scrolled .menu-toggle {
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('assets/hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding: 0 1rem;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-content span {
    color: var(--accent);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 77, 41, 0.3);
}

/* Sections */
section {
    padding: 100px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title .underline {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto;
}

/* Card System */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid #eee;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: 'Scopri di più';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background: var(--accent);
    color: white;
    text-align: center;
    padding: 0.5rem 0;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 600;
}

.card:hover::after {
    bottom: 0;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
}

/* Products Section */
.bg-dark-section {
    background: var(--primary);
    color: var(--text-light);
}

/* Slider auto-scroll per Prodotti/Servizi */
.product-slider-wrapper {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.product-slider-wrapper::before,
.product-slider-wrapper::after {
    content: "";
    position: absolute;
    height: 100%;
    width: 120px;
    top: 0;
    z-index: 2;
    pointer-events: none;
}

.product-slider-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-light) 0%, transparent 100%);
}

.product-slider-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-light) 0%, transparent 100%);
}

.bg-dark-section .product-slider-wrapper::before {
    background: linear-gradient(to right, var(--primary) 0%, transparent 100%);
}

.bg-dark-section .product-slider-wrapper::after {
    background: linear-gradient(to left, var(--primary) 0%, transparent 100%);
}

.product-slide-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: slide-products 25s linear infinite;
}

.product-slide-track.reverse {
    animation: slide-products-reverse 25s linear infinite;
}

.product-slide-track.reverse.slow {
    animation: slide-products-reverse 60s linear infinite;
}

.product-slide-track:hover {
    animation-play-state: paused;
}

@keyframes slide-products {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes slide-products-reverse {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.product-slide-track .card {
    width: 240px;
    flex: 0 0 auto;
    cursor: pointer;
    padding: 2rem 1.4rem;
}

/* Testimonial Cards */
.testimonial-card {
    width: 380px;
    flex: 0 0 auto;
    background: white;
    border-radius: 16px;
    padding: 2rem 2rem 1.5rem;
    border: 1px solid #eee;
    border-left: 4px solid var(--accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: var(--transition);
}

.testimonial-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.testimonial-quote {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    font-style: italic;
}

.testimonial-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid #f0f0f0;
    padding-top: 0.8rem;
}

.testimonial-author strong {
    color: var(--accent);
}


/* Email Obfuscation */
.obf-email {
    unicode-bidi: bidi-override;
    direction: rtl;
    display: inline-block;
    cursor: pointer;
}

/* Slider Clienti (Marquee) */
.logo-slider {
    padding: 4rem 0;
    overflow: hidden;
    position: relative;
    background: #fff;
    margin: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.logo-slider::before,
.logo-slider::after {
    content: "";
    height: 100%;
    position: absolute;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.logo-slider::before {
    left: 0;
    top: 0;
    background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);
}

.logo-slider::after {
    right: 0;
    top: 0;
    background: linear-gradient(to left, white 0%, rgba(255, 255, 255, 0) 100%);
}

.logo-slide-track {
    display: flex;
    width: calc(250px * 16);
    animation: scroll 24s linear infinite;
    align-items: center;
}

.logo-slide-track:hover {
    animation-play-state: paused;
}

.slide {
    width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    cursor: pointer;
}

.slide-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 12px;
    width: 200px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
}

.slide-card:hover {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.slide h4 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.slide p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 8));
    }
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info div {
    margin-bottom: 2rem;
}

.contact-info h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input,
textarea {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
}

/* Footer */
footer {
    background: #000;
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(20px);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(150%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 500px;
}

#cookie-banner.show {
    transform: translateY(0);
}

.cookie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-header h4 {
    font-size: 1.2rem;
    color: var(--accent);
}

.close-banner {
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.5;
    transition: var(--transition);
}

.close-banner:hover {
    opacity: 1;
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
    color: #ccc;
}

.cookie-content a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
}

.cookie-option input[type="checkbox"] {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
}

.cookie-btns {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-cookie {
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

.btn-all {
    background: var(--accent);
    color: white;
}

.btn-save {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-reject {
    background: transparent;
    color: #aaa;
    border: 1px solid #444;
}

.btn-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 77, 41, 0.3);
}

/* Legal Content Section */
.legal-section {
    max-width: 800px;
    margin: 120px auto;
    padding: 0 2rem;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 24px;
    position: relative;
    padding: 3rem;
    overflow-y: auto;
    transform: translateY(50px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
    opacity: 0.5;
    transition: var(--transition);
}

.modal-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

.modal-content h3 {
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.modal-content p {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 1.5rem;
}

.modal-content ul {
    list-style: none;
    margin-bottom: 2rem;
}

.modal-content li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.modal-content li i {
    color: var(--accent);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .modal-container {
        padding: 2rem 1.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        margin: 0 !important;
        background: var(--primary);
        flex-direction: column;
        padding: 1.5rem 0;
        text-align: center;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: -1;
        opacity: 0;
        visibility: hidden;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    header {
        background: var(--primary);
    }

    header.scrolled .nav-links {
        background: white;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .hero {
        height: min-content;
        min-height: 100vh;
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
}