/* CSS: TEMA SCURO CON NAVBAR CHIARA */
:root {
    --brand-blue: #337AB7; --bg-dark: #101010; --bg-medium: #1E1E1E; --bg-white: #ffffff;
    --text-primary: #F0F0F0; --text-dark: #2c3e50; --text-secondary: #a9a9a9;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; line-height: 1.7; background-color: var(--bg-dark); color: var(--text-primary); }
.container { max-width: 1200px; margin: auto; padding: 0 20px; }
section { padding: 80px 0; border-bottom: 1px solid #2a2a2a; }
h1, h2, h3 { margin-bottom: 20px; color: var(--text-primary); font-weight: 600; }
h2 { font-size: 2.8rem; text-align: center; position: relative; padding-bottom: 15px; }
h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background-color: var(--brand-blue); border-radius: 2px; }
p { color: var(--text-secondary); margin-bottom: 15px; max-width: 800px; margin-left: auto; margin-right: auto; }
#azienda p, #realizzazioni p, #contatti p { text-align: center; }
.btn { display: inline-block; background-color: var(--brand-blue); color: var(--bg-white); padding: 12px 30px; text-decoration: none; border-radius: 50px; font-weight: bold; border: 2px solid var(--brand-blue); transition: all 0.3s ease; margin-top: 20px; cursor: pointer; }
.btn:hover { background-color: transparent; color: var(--brand-blue); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(51, 122, 183, 0.2); }

/* NAVBAR E MENU HAMBURGER */
.navbar { background-color: var(--bg-white); box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 8px 0; position: fixed; width: 100%; top: 0; z-index: 1000; transition: box-shadow 0.3s ease; }
.navbar.scrolled { box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.navbar .logo img { height: 50px; width: auto; }
.navbar nav ul { list-style: none; display: flex; }
.navbar nav ul li { margin-left: 25px; }
.navbar nav ul li a { color: var(--text-dark); text-decoration: none; font-weight: 500; position: relative; padding-bottom: 5px; }
.navbar nav ul li a:hover { color: var(--brand-blue); }
.navbar nav ul li a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--brand-blue); transition: width 0.3s ease; }
.navbar nav ul li a:hover::after { width: 100%; }
.hamburger-menu { display: none; cursor: pointer; z-index: 1001; }
.hamburger-menu span { display: block; width: 25px; height: 3px; margin: 5px 0; background-color: var(--text-dark); transition: all 0.3s ease-in-out; }

/* HERO SECTION */
#home { background: linear-gradient(rgba(16, 16, 16, 0.3), rgba(16, 16, 16, 0.3)), url('img/hero-background.jpg') center center/cover no-repeat; color: var(--text-primary); height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-top: 66px; }
#home h1 { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--text-primary); font-weight: 700; margin-bottom: 0; }

/* GRIGLIA CARD */
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin-top: 50px; }
.card { background: var(--bg-medium); padding: 35px 30px; border-radius: 10px; border: 1px solid #2a2a2a; transition: all 0.3s ease; text-align: center; }
.card:hover { transform: translateY(-10px); border-color: var(--brand-blue); box-shadow: 0 10px 30px rgba(51, 122, 183, 0.1); }
.card h3 { color: var(--brand-blue); }

/* GALLERY E LIGHTBOX */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; margin-top: 50px; }
.gallery-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.gallery-grid img:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(0,0,0,0.5); }
.lightbox { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); justify-content: center; align-items: center; }
.lightbox img { max-width: 90%; max-height: 80%; }
.lightbox .close, .lightbox .prev, .lightbox .next { position: absolute; color: white; font-size: 3rem; font-weight: bold; cursor: pointer; user-select: none; }
.lightbox .close { top: 20px; right: 40px; }
.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

/* FORM CONTATTI E ACCESSIBILITÀ */
#contatti form { max-width: 700px; margin: 40px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { position: relative; }
.full-width { grid-column: 1 / -1; }
#contatti input, #contatti textarea { width: 100%; padding: 15px; border: 1px solid #2a2a2a; border-radius: 5px; background-color: var(--bg-medium); color: var(--text-primary); font-family: inherit; font-size: 1rem; }
#contatti button { grid-column: 1 / -1; width: auto; justify-self: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.contact-details { text-align: center; margin-top: 50px; }
.contact-details p { color: var(--text-primary); margin-bottom: 8px; }

/* FOOTER E ANIMAZIONI */
footer { background-color: var(--bg-medium); text-align: center; padding: 30px 0; border-top: 1px solid #2a2a2a; }
.reveal { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- STILI PER PAGINA PRODOTTO --- */
.page-start {
    padding-top: 120px; /* Aggiunge spazio per la navbar fissa */
}
.product-description h1 {
    font-size: 3.5rem;
    color: var(--brand-blue);
    margin-bottom: 30px;
    line-height: 1.2;
}
.product-content {
    display: grid;
    grid-template-columns: 1fr; /* Default a 1 colonna per mobile */
    gap: 50px;
    align-items: flex-start;
}
.product-description ul {
    list-style-position: inside;
    padding-left: 10px;
    color: var(--text-secondary);
}
.product-description ul li {
    margin-bottom: 10px;
}
.product-gallery h3 {
    margin-bottom: 15px;
}
.product-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
}

/* MEDIA QUERIES */
@media (min-width: 768px) {
    .product-content {
        /* 2 colonne su schermi più grandi */
        grid-template-columns: 2fr 1fr;
    }
    .product-description h1 {
        font-size: 4.5rem;
    }
}

@media (max-width: 992px) {
    h2 { font-size: 2.2rem; }
    .hamburger-menu { display: block; }
    .navbar .main-nav { position: absolute; top: 66px; left: 0; width: 100%; background-color: var(--bg-white); max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.23, 1, 0.32, 1); }
    .navbar .main-nav.active { max-height: 500px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
    .navbar nav ul { flex-direction: column; align-items: center; padding: 10px 0; }
    .navbar nav ul li { margin: 10px 0; margin-left: 0; }
    .hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger-menu.active span:nth-child(2) { opacity: 0; }
    .hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
    #contatti form { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .product-description h1 {
        font-size: 2.8rem;
        text-align: center;
    }
}