:root {
    --primary-red: #a63c3c;
    --milano-red-hover: #c24646;
    --dark-gray-bg: #15171a;
    --panel-bg: #1e2126;
    --panel-border: #2d323a;
    --text-light: #e4e6eb;
    --text-muted: #a0a6b1;
    --shadow: 0 8px 32px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background-color: var(--dark-gray-bg); color: var(--text-light); font-family: 'Roboto', sans-serif; line-height: 1.6; padding-top: 100px; overflow-x: hidden; }

/* HEADER */
header { 
    background: rgba(21, 23, 26, 0.98); padding: 1.2rem 5%; position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; 
    display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--primary-red); 
}
.logo-box { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { font-size: 1.6rem; color: var(--primary-red); }
.logo-text { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.3rem; text-transform: uppercase; color: var(--text-light); text-decoration: none; }

nav { display: none; }
@media (min-width: 768px) {
    nav { display: flex; align-items: center; }
    nav a { color: var(--text-light); text-decoration: none; font-family: 'Montserrat'; font-weight: 700; font-size: 0.9rem; margin-left: 25px; transition: 0.3s; }
    nav a:hover { color: var(--primary-red); text-shadow: 0 0 8px var(--primary-red); }
}

/* MAIN STRUCTURE */
main { max-width: 1200px; margin: auto; padding-bottom: 50px; }
section { padding: 40px 20px; margin-bottom: 40px; }

h2 { font-family: 'Montserrat', sans-serif; font-size: 2.2rem; text-align: center; margin-bottom: 40px; text-transform: uppercase; color: var(--text-light); }
h2::after { content: ''; display: block; width: 60px; height: 4px; background: var(--primary-red); margin: 15px auto; }

/* HERO - STILE EQUILIBRATO AD ALTA LEGGIBILITÀ */
.hero { 
    text-align: center; padding: 110px 20px; border-radius: 12px; border: 1px solid var(--panel-border);
    background: linear-gradient(rgba(21, 23, 26, 0.82) 0%, rgba(21, 23, 26, 0.88) 100%), url('img/fabbro-milano.webp');
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero h1 { font-family: 'Montserrat', sans-serif; font-size: 3.5rem; margin-bottom: 10px; font-weight: 900; text-transform: uppercase; color: var(--text-light); }
.hero h1 span { color: var(--primary-red); }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 30px; }

.btn-container { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.btn-call { 
    background: var(--primary-red); color: white; padding: 16px 35px; border-radius: 5px; 
    text-decoration: none; font-weight: 900; display: inline-block; text-transform: uppercase;
    font-family: 'Montserrat'; border: 2px solid transparent; transition: 0.3s ease; cursor: pointer;
    min-width: 160px; text-align: center;
}
.btn-call:hover { background: transparent; border-color: var(--primary-red); color: var(--primary-red); }
.btn-wa { background: #128c7e; }
.btn-wa:hover { background: transparent; border-color: #128c7e; color: #128c7e; }

/* GRID & CARDS */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.card { background: var(--panel-bg); padding: 35px 25px; border-radius: 8px; border: 1px solid var(--panel-border); border-left: 4px solid var(--primary-red); cursor: pointer; transition: 0.4s; text-align: left; }
.card:hover { border-color: #fff; transform: translateY(-5px); background: #26292e; }
.card h3 { color: var(--primary-red); margin-bottom: 10px; text-transform: uppercase; font-family: 'Montserrat'; font-size: 1.25rem; }
.card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.card span { color: var(--primary-red); font-weight: 800; font-size: 0.75rem; display: block; margin-top: 15px; text-transform: uppercase; }

/* INFO SEO BOX DYNAMIC CON SFONDO IMMAGINE */
.info-seo-box { display: none; background: var(--panel-bg); border: 1px solid var(--primary-red); border-radius: 8px; margin-top: 40px; box-shadow: var(--shadow); padding: 0; overflow: hidden; }
.box-overlay-sfondo { background-size: cover; background-position: center; background-repeat: no-repeat; position: relative; width: 100%; padding: 40px; box-sizing: border-box; }
.box-overlay-sfondo::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(30, 33, 38, 0.9) 0%, rgba(21, 23, 26, 0.95) 100%); z-index: 1; }
.box-inside-content { position: relative; z-index: 2; }
.box-seo-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.box-seo-titolo { color: var(--primary-red); font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.8rem; text-transform: uppercase; margin: 0; }
.box-seo-chiudi { background: transparent; border: 1px solid #fff; color: white; padding: 8px 15px; cursor: pointer; font-family: 'Montserrat'; font-weight: 700; transition: 0.2s; border-radius: 4px; }
.box-seo-chiudi:hover { background: white; color: var(--dark-gray-bg); }
.box-seo-sottotitolo { color: var(--text-light); font-size: 1.1rem; margin: 10px 0 20px 0; font-weight: 700; }
.box-seo-linea { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.2); margin: 20px 0; }
.box-seo-testo { 
    color: var(--text-light); 
    line-height: 1.8; 
    font-size: 1rem; 
    text-align: left; 
}

.seo-keyword-title {
    color: var(--primary-red);
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    display: block;
    margin-top: 25px;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

/* LIST DYNAMIC CONTAINERS */
.tech-btn { background: var(--panel-border); color: white; border: none; padding: 15px; border-radius: 5px; cursor: pointer; font-weight: 700; width: 100%; font-family: 'Montserrat'; text-transform: uppercase; transition: 0.3s; text-align: center; }
.tech-btn:hover { background: var(--primary-red); box-shadow: 0 0 15px rgba(166, 60, 60, 0.4); }

.list-container { display: none; margin-top: 15px; background: var(--dark-gray-bg); padding: 20px; border-radius: 8px; border: 1px solid var(--panel-border); max-height: 350px; overflow-y: auto; }
.list-container a { display: block; color: var(--text-muted); text-decoration: none; padding: 10px 5px; border-bottom: 1px solid var(--panel-border); font-size: 0.95rem; }
.list-container a:hover { color: var(--primary-red); padding-left: 8px; transition: 0.3s; }

/* INTERFACCIA D'ONBOARDING MODALE */
.modal-backup { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(21, 23, 26, 0.88); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(6px); }
.modal-content-lavora { background: var(--panel-bg); border: 2px solid var(--panel-border); padding: 35px; border-radius: 12px; width: 100%; max-width: 500px; box-shadow: var(--shadow); position: relative; animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modalSlideIn { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; text-align: left; }
.form-group label { font-family: 'Montserrat'; font-weight: 700; font-size: 0.85rem; color: var(--text-light); text-transform: uppercase; }
.form-group input, .form-group select { background: var(--dark-gray-bg); border: 1px solid var(--panel-border); padding: 12px; border-radius: 4px; color: var(--text-light); font-family: 'Roboto'; font-size: 0.95rem; transition: 0.2s; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary-red); outline: none; }
.form-group-checkbox { display: flex; gap: 12px; align-items: flex-start; text-align: left; margin: 20px 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.form-group-checkbox input { margin-top: 3px; transform: scale(1.2); accent-color: var(--primary-red); }

/* SPECIAL FOOTER */
footer { text-align: center; padding: 40px 20px; background: #000; color: #555; font-family: 'Montserrat'; font-size: 0.85rem; border-top: 2px solid var(--primary-red); }

@media (max-width: 768px) {
    body { padding-top: 80px; }
    .hero h1 { font-size: 2.2rem; }
    .box-seo-titolo { font-size: 1.4rem; }
    .box-overlay-sfondo { padding: 30px 20px; }
    .modal-content-lavora { width: 92%; padding: 25px 20px; }
}