:root {
    --primary: #1e293b;
    --accent: #f97316;
    --text-dark: #334155;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

.hero {
    max-width: none;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    min-height: 50vh;
    background: linear-gradient(rgba(59, 30, 30, 0.85), rgba(59, 30, 30, 0.85)), url('assets/images/background.webp') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 80px 20px;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    max-width: 900px;
    line-height: 1.2;
}

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

.hero p {
    font-size: 1.15rem;
    max-width: 700px;
    margin-bottom: 30px;
    color: #cbd5e1;
}

.btn {
    background-color: var(--accent);
    color: var(--white);
    padding: 14px 35px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    transition: 0.3s;
}

.btn:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
}

/* Sezioni */
section {
    padding: 80px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    /* text-align: center; */
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.3rem;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-title p {
    color: #64748b;
    font-size: 1.1rem;
}

/* About Grid con Immagine */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text h3 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    color: #475569;
}

/* Servizi e Card Prodotti con Immagine */
.services-bg {
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border-top: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    /* serve per il clip dell'immagine */
    position: relative;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #fb923c);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.card-img-wrapper {
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0;
    transition: transform 0.4s ease;
}

.service-card:hover .card-img {
    transform: scale(1.08);
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--accent);
}

.service-card .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .arrow {
    transform: translateX(6px);
}

/* Contatti e Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-title {
    text-align: center;
    margin-bottom: 50px;
}

.contact-info {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 8px;

    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contact-info p {
    margin-bottom: 20px;
    color: #475569;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.antispam-field {
    display: none !important;
}

/* Footer & Cookie Banner */
footer {
    background: var(--primary);
    color: #cbd5e1;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#footer-placeholder {
    margin-top: auto;
    width: 100%;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #0f172a;
    color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

#cookie-banner p {
    max-width: 800px;
    font-size: 0.95rem;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn-accept {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.cookie-btn-reject {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #64748b;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* Selettore Lingua */
.lang-switcher {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 8px;
    margin-left: 30px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.lang-btn:hover:not(.active) {
    color: var(--white);
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    nav a {
        margin-left: 15px;
        font-size: 0.85rem;
    }

    .lang-switcher {
        margin-left: 15px;
        padding: 2px 4px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

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

    section {
        padding: 50px 20px;
    }

    #cookie-banner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 90vh;
    margin-top: 3vh;
    border-radius: 8px;
    object-fit: contain;
    animation: zoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent);
}

footer a {
    color: #e2e8f0;
    text-decoration: underline;
}

footer a:hover {
    color: var(--accent);
}

/* --- Stili per lo Slideshow nella pagina --- */
.slideshow-container {
    position: relative;
    margin: auto;
    width: 100%;
}

.mySlides {
    display: none;
    /* Nasconde tutte le slide di default */
}

.mySlides img {
    width: 100%;
    height: 380px;
    object-fit: contain;
    background-color: var(--bg-light);
    border-radius: 8px;
    /* Opzionale, per arrotondare i bordi */
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.mySlides img:hover {
    opacity: 0.9;
}

/* Frecce slideshow pagina */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s ease;
    border-radius: 0 4px 4px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Effetto di transizione morbida */
.fade {
    animation-name: fade;
    animation-duration: 0.8s;
}

@keyframes fade {
    from {
        opacity: .5
    }

    to {
        opacity: 1
    }
}

/* --- Stili aggiuntivi per il Modale (Lightbox) --- */
.prev-modal,
.next-modal {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 20px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    user-select: none;
    z-index: 1000;
}

.next-modal {
    right: 5%;
}

.prev-modal {
    left: 5%;
}

.prev-modal:hover,
.next-modal:hover {
    color: #bbb;
}

.slide-caption {
    color: #555;
    font-size: 14px;
    padding: 10px 8px 0 8px;
    text-align: center;
    font-style: italic;
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ffffff;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 300;
}