@import url('https://fonts.googleapis.com/css2?family=Monoton&display=swap');

:root {
    --bg-dark: #080706;
    --gold-main: #c79835;
    --gold-light: #fbe095;
    --text-light: #e0e0e0;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    /* NUOVO SFONDO: Effetto Oro Spazzolato (Brushed Gold Texture) */
    background-image: 
        linear-gradient(135deg, rgba(199, 152, 53, 0.05) 0%, transparent 35%, rgba(199, 152, 53, 0.08) 52%, transparent 70%, rgba(199, 152, 53, 0.04) 100%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 4px),
        repeating-linear-gradient(-45deg, rgba(199, 152, 53, 0.018) 0px, rgba(199, 152, 53, 0.018) 1px, transparent 1px, transparent 6px);
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sidebar Scroll (Desktop) */
.scroll-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 70px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(199, 152, 53, 0.15);
    background: rgba(8, 7, 6, 0.95);
    z-index: 1000;
}

.scroll-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: 'Monoton', sans-serif;
    font-size: 2.8rem;
    letter-spacing: 6px;
    color: transparent;
    -webkit-text-stroke: 1px rgba(199, 152, 53, 0.25);
    background: linear-gradient(to top, var(--gold-main) var(--scroll-fill, 0%), transparent var(--scroll-fill, 0%));
    -webkit-background-clip: text;
    background-clip: text;
}

.main-wrapper {
    margin-left: 70px;
}

/* Header & Scia Neon */
.header {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(8, 7, 6, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px 20px 15px 20px;
    border-bottom: 1px solid rgba(199, 152, 53, 0.3);
    position: sticky;
    top: 0;
    z-index: 999;
    gap: 12px;
}

.logo-neon {
    font-family: 'Monoton', sans-serif;
    font-size: 42px;
    text-decoration: none;
    letter-spacing: 2px;
    background: linear-gradient(120deg, var(--gold-light) 0%, var(--gold-light) 40%, #ffffff 50%, var(--gold-light) 60%, var(--gold-light) 100%);
    background-size: 200% auto;
    background-position: 200% center;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(199, 152, 53, 0.5));
    transition: filter 0.3s ease;
}

.logo-neon:hover {
    animation: shineSweep 0.8s ease-in-out forwards;
    filter: drop-shadow(0 0 15px rgba(199, 152, 53, 0.8));
}

@keyframes shineSweep {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.header_menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.header_menu_item a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s;
}

.header_menu_item a:hover { color: var(--gold-main); }
.header_icon-bar { display: none; }
.header_icon-bar span {
    display: block;
    height: 3px;
    width: 30px;
    background-color: var(--gold-main);
    margin-bottom: 6px;
}

/* Tipografia */
.dynamic-heading {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--gold-light), var(--gold-main));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.5s ease;
    background-size: 200% auto;
    margin-bottom: 15px;
}

.dynamic-heading:hover { background-position: right center; }
.gold-heading { color: var(--gold-main); font-size: 1.6rem; margin-bottom: 15px; }

/* COVER MATRIX 100vh */
.cover {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    position: relative; 
    overflow: hidden; 
}

#matrixCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
}

.cover_content {
    max-width: 850px;
    position: relative;
    z-index: 10; 
    background: rgba(8, 7, 6, 0.82); 
    padding: 45px 35px;
    border-radius: 16px;
    border: 1px solid rgba(199, 152, 53, 0.25);
    box-shadow: 0 0 40px rgba(0,0,0,0.9);
}

.cover_copy_text {
    font-size: 1.25rem;
    margin: 20px 0 30px 0;
    color: #e0e0e0;
}

.cover-cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Pulsanti CTA */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    background: transparent;
    color: var(--gold-main);
    border: 2px solid var(--gold-main);
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.cta-button:hover {
    background: var(--gold-main);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(199, 152, 53, 0.6);
}

.cta-button.small { padding: 10px 18px; font-size: 0.85rem; }
.cta-button.solid { background: var(--gold-main); color: var(--bg-dark); }
.cta-button.solid:hover { background: #fff; border-color: #fff; color: #000; }

/* Sezioni Generali */
.services-section, .used-showcase, .novita-section, .locations-section {
    padding: 90px 20px;
    text-align: center;
}

.section-subtitle {
    margin-top: -5px;
    margin-bottom: 55px;
    color: #a0a0a0;
    font-size: 1.1rem;
}

/* 1. SERVIZI SU UN'UNICA RIGA */
.services-row-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1350px;
    margin: 0 auto;
}

.tech-card {
    background-color: #12100e;
    width: 100%;
    padding: 35px 22px;
    border-radius: 12px;
    position: relative;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(199, 152, 53, 0.15), inset 0 0 0 1px rgba(199, 152, 53, 0.3);
    animation: glowLoop 3s infinite alternate;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@keyframes glowLoop {
    0% { box-shadow: 0 0 10px rgba(199, 152, 53, 0.1), inset 0 0 0 1px rgba(199, 152, 53, 0.25); }
    100% { box-shadow: 0 0 22px rgba(199, 152, 53, 0.45), inset 0 0 0 1px rgba(199, 152, 53, 0.7); }
}

.tech-card:hover {
    animation: none;
    transform: translateY(-8px);
    background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    color: #000;
}

.tech-card:hover .card-title, .tech-card:hover .card-text, .tech-card:hover .card-icon { color: #000; }
.card-icon { font-size: 2.8rem; color: var(--gold-main); margin-bottom: 18px; }
.card-title { font-size: 1.35rem; margin-bottom: 12px; color: #fff; }
.card-text { font-size: 0.95rem; color: #aaa; }

/* 2. VIDEO ASSISTENZA */
.video-section {
    padding: 30px 20px 70px 20px;
    display: flex;
    justify-content: center;
}

.video-container {
    max-width: 950px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 35px rgba(199, 152, 53, 0.25);
    border: 2px solid rgba(199, 152, 53, 0.45);
    background: #000;
}

.promo-video {
    width: 100%;
    display: block;
}

/* 3. NOVITÀ VETRINA PATCHWORK (Bento Grid) */
.patchwork-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 270px 270px 270px;
    grid-template-areas:
      "hero hero side1"
      "hero hero side2"
      "sub1 sub2 side2";
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.patchwork-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(199, 152, 53, 0.35);
    background: #111;
    transition: all 0.4s ease;
}

.patchwork-item:hover {
    transform: scale(1.015);
    border-color: var(--gold-main);
    box-shadow: 0 12px 30px rgba(199, 152, 53, 0.3);
    z-index: 2;
}

.patchwork-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.item-hero { grid-area: hero; }
.item-side1 { grid-area: side1; }
.item-side2 { grid-area: side2; }
.item-sub1 { grid-area: sub1; }
.item-sub2 { grid-area: sub2; }

.patchwork-label {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: rgba(8, 7, 6, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(199, 152, 53, 0.5);
    padding: 8px 18px;
    border-radius: 30px;
    color: var(--gold-light);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

/* Usato Showcase card flex standard */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.showcase-card { width: 350px; }

/* 5. SEDI CON ORARI CENTRALI (3 Colonne) */
.locations-3col-container {
    display: grid;
    grid-template-columns: 1fr 0.9fr 1fr;
    gap: 30px;
    max-width: 1350px;
    margin: 0 auto;
    align-items: stretch;
}

.location-card {
    background: #12100e;
    border: 1px solid rgba(199, 152, 53, 0.4);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.location-info { padding: 25px; text-align: left; }
.location-title { color: var(--gold-main); font-size: 1.4rem; margin-bottom: 10px; }
.location-address { font-size: 1rem; color: #fff; margin-bottom: 20px; }
.location-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.location-map { width: 100%; height: 260px; }
.location-map iframe { width: 100%; height: 100%; border: 0; }

.orari-box-center {
    background: rgba(18, 16, 14, 0.95);
    border: 2px solid var(--gold-main);
    padding: 30px 20px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.9);
}

.orari-list {
    list-style: none;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-top: 10px;
}

.orari-list li { margin-bottom: 12px; border-bottom: 1px dashed rgba(199,152,53,0.15); padding-bottom: 8px;}
.orari-list li:last-child { border: none; }
.orari-list strong { color: #fff; }
.orari-list .closed { color: #e57373; font-weight: bold; }

/* Footer */
.footer {
    background-color: #050404;
    padding: 60px 20px 30px 20px;
    border-top: 1px solid rgba(199, 152, 53, 0.3);
    text-align: center;
}

.social-links { display: flex; gap: 25px; justify-content: center; margin-bottom: 25px; }
.social-links a { color: var(--text-light); font-size: 1.8rem; transition: color 0.3s; }
.social-links a:hover { color: var(--gold-main); }
.p-iva { font-size: 0.85rem; color: #666; }

/* Animazioni Scroll Reveal */
.reveal {
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active { transform: translateY(0); opacity: 1; }

/* =========================================
   MEDIA QUERIES (Responsive)
   ========================================= */
@media (max-width: 1150px) {
    .services-row-container { grid-template-columns: repeat(2, 1fr); }
    .locations-3col-container { grid-template-columns: 1fr; max-width: 600px; }
    
    /* Ordine intelligente su Tablet/Mobile: Gorizia -> Orari -> Cadorna */
    .loc-gorizia { order: 1; }
    .orari-box-center { order: 2; margin: 10px 0; }
    .loc-cadorna { order: 3; }
}

@media (max-width: 950px) {
    .scroll-sidebar { display: none; }
    .main-wrapper { margin-left: 0; }
    .header { flex-direction: row; justify-content: space-between; padding: 15px 25px; }
    .logo-neon { font-size: 26px; }
    .header_menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: rgba(8, 7, 6, 0.98);
        padding: 25px 0; text-align: center;
        border-bottom: 2px solid var(--gold-main);
    }
    .header_menu.is-open { display: flex; }
    .header_icon-bar { display: block; }
    .dynamic-heading { font-size: 2.1rem; }

    /* Smontaggio Griglia Patchwork per schermi medi */
    .patchwork-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        grid-template-areas: none;
    }
    .patchwork-item { grid-area: auto !important; height: 260px; }
    .item-hero { grid-column: span 2; height: 340px; }
}

@media (max-width: 650px) {
    .services-row-container { grid-template-columns: 1fr; }
    .patchwork-grid { grid-template-columns: 1fr; }
    .item-hero { grid-column: span 1; height: 280px; }
    .cover-cta-group { flex-direction: column; width: 100%; }
    .cta-button { width: 100%; justify-content: center; }
}
/* =========================================
   COOKIE BANNER E PAGINE LEGALI
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(8, 7, 6, 0.98);
    border-top: 2px solid var(--gold-main);
    padding: 25px 20px;
    z-index: 9999;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.9);
    transition: bottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-text {
    font-size: 0.95rem;
    color: #e0e0e0;
    max-width: 900px;
    line-height: 1.6;
}

.cookie-text a {
    color: var(--gold-main);
    text-decoration: underline;
    transition: color 0.3s;
}

.cookie-text a:hover {
    color: var(--gold-light);
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.legal-content-block {
    padding: 60px 40px 100px 40px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    color: #ccc;
}

.legal-content-block h2 {
    color: var(--gold-main);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.legal-content-block p, .legal-content-block ul {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.legal-content-block ul {
    padding-left: 20px;
}

.legal-content-block li {
    margin-bottom: 8px;
}

.footer-legal-links {
    margin-top: 10px;
}

.footer-legal-links a {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-legal-links a:hover {
    color: var(--gold-main);
}