/* Stili di base */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    color: #333;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* Header e Navigazione */
header {
    background-color: #fff;
    padding: 4px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease;
    backdrop-filter: saturate(100%) blur(0px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
    padding-bottom: 4px;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

header .brand-logo {
    height: 80px !important;
    width: auto;
    display: block;
    transition: height 220ms ease;
}

/* Stato ridotto allo scroll */
header.shrink {
    padding: 2px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    backdrop-filter: saturate(120%) blur(6px);
}

header.shrink .brand-logo {
    height: 70px !important;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #d197e4;
}

/* Toggle/hamburger base */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    width: 40px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
}

.nav-toggle-bar {
    display: block;
    position: absolute;
    left: 7px;
    right: 7px;
    height: 2px;
    background: #111;
    transition: transform 220ms ease, opacity 220ms ease, background 220ms ease;
}

.nav-toggle-bar:nth-child(1) { top: 9px; }
.nav-toggle-bar:nth-child(2) { top: 15px; }
.nav-toggle-bar:nth-child(3) { top: 21px; }

/* Migliora contrasto hamburger su sfondo vario */
header .nav-toggle {
    border-radius: 6px;
    padding: 6px;
}
header.shrink .nav-toggle-bar {
    background: #111;
}

/* Sezioni del sito */
section {
    padding: 60px 0;
    text-align: center;
}

.hero {
    background-color: #f8f8f8;
    /* Sfondo immagine */
    background-image: url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: #fff;
    padding: 120px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero h2 {
    color: #fff;
    font-size: 2.5em;
    margin-bottom: 10px;
}

/* Overlay per migliorare contrasto testo su immagine */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.35);
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Mobile: immagine e dimensioni ottimizzate */
@media (max-width: 768px) {
    .hero {
        background-image: url('images/hero-mobile.jpg');
        background-position: center;
        padding: 80px 0;
        min-height: 60vh;
    }

    .hero h2 {
        font-size: 2em;
    }

    .hero p {
        font-size: 1em;
    }

    /* Mobile header: titolo su una riga e hamburger visibile */
    header .brand-logo {
        white-space: nowrap;
        height: 96px !important;
    }

    header.shrink .brand-logo {
        height: 64px !important;
    }

    .nav-toggle {
        display: inline-flex;
        background: transparent;
    }

    header .nav ul {
        flex-direction: column;
        gap: 12px;
    }

    header .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.08);
        display: none;
        padding: 12px 20px;
        transform-origin: top;
        transform: scaleY(0.98);
        opacity: 0;
        transition: opacity 180ms ease, transform 180ms ease;
    }

    header .nav.open {
        display: block;
        transform: scaleY(1);
        opacity: 1;
    }

    /* Animazione hamburger -> X quando aria-expanded=true */
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

.cta-button {
    display: inline-block;
    background-color: #b565a7;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
}

.service-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.service-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    flex: 1 1 300px;
    text-align: left;
}

.contact h3 {
    color: #b565a7;
}

.contact form {
    max-width: 500px;
    margin: 20px auto 0;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.contact label {
    margin-top: 10px;
    font-weight: bold;
}

.contact input, .contact textarea {
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.contact button {
    margin-top: 20px;
    padding: 12px;
    background-color: #b565a7;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* Mappa a tutta larghezza */
.map-section {
    width: 100%;
    padding: 0;
}

.map-embed {
    border: 0;
    width: 100%;
    height: 420px;
    display: block;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.social-links a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    transition: background 0.3s;
}

.social-links a:hover {
    background: rgba(255,255,255,0.22);
}

/* Slider Gallery */
.gallery-section h2 {
    color: #b565a7;
}

.gallery-intro {
    max-width: 760px;
    margin: 0 auto 16px;
    color: #555;
}

.slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-top: 20px;
    transition: height 300ms ease;
    max-height: 90vh;
}

.slides {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    user-select: none;
}

.slide img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.slide video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    background: #000;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .slider { max-height: 80vh; }
    .slide img { max-height: 80vh; }
    .slide video { max-height: 80vh; }

    /* Niente frecce su mobile: si usa lo swipe */
    .slider-btn { display: none; }
}
