/* =========================================
   STILE PERSONALIZZATO "DARK PREMIUM"
   Sfondo scuro, testi bianchi, accenti Oro/Giallo
   ========================================= */

/* Variabili CSS per gestire i colori facilmente */
:root {
    --bg-main: #121212;       /* Sfondo generale del sito (Nero morbido) */
    --bg-card: #1e1e1e;       /* Sfondo dei box e delle card (Grigio scuro) */
    --bg-hover: #2c2c2c;      /* Colore al passaggio del mouse */
    --text-main: #e0e0e0;     /* Colore del testo principale (Grigio chiarissimo) */
    --text-muted: #9e9e9e;    /* Colore testo secondario */
    --accent-color: #f39c12;  /* Colore primario (Oro/Giallo Sportivo) */
    --border-color: #333333;  /* Colore delle linee di separazione */
}

body { font-family: 'Montserrat', sans-serif; background-color: var(--bg-main); color: var(--text-main); }

/* =========================================
   SOVRASCRITTURA CLASSI BOOTSTRAP PER DARK MODE
   (Così non devi modificare i file PHP!)
   ========================================= */
.bg-white { background-color: var(--bg-card) !important; }
.bg-light { background-color: var(--bg-hover) !important; }
.text-dark { color: #ffffff !important; }
.text-muted { color: var(--text-muted) !important; }
.border, .border-bottom, .border-top { border-color: var(--border-color) !important; }
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.5) !important; }

/* Bottoni personalizzati Oro/Nero */
.btn-primary { background-color: var(--accent-color); border-color: var(--accent-color); color: #000; }
.btn-primary:hover, .btn-primary:focus { background-color: #d68910; border-color: #d68910; color: #000; box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4); }
.btn-outline-primary { color: var(--accent-color); border-color: var(--accent-color); }
.btn-outline-primary:hover { background-color: var(--accent-color); color: #000; }

/* Input dei moduli (ricerca e contatti) */
.form-select, .form-control { background-color: var(--bg-hover); color: #fff; border: 1px solid var(--border-color); }
.form-select:focus, .form-control:focus { background-color: var(--bg-main); color: #fff; border-color: var(--accent-color); box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.25); }
.form-select option { background-color: var(--bg-card); color: #fff; }

/* =========================================
   STRUTTURA GENERALE
   ========================================= */

/* Navbar */
.navbar { background-color: var(--bg-card) !important; box-shadow: 0 2px 15px rgba(0,0,0,0.8); padding: 15px 0; border-bottom: 1px solid #000; }
/* NOTA: Se il tuo logo è nero e non si vede sullo sfondo scuro, togli i commenti alla riga qui sotto per farlo diventare bianco */
/* .navbar-brand img { filter: brightness(0) invert(1); } */
.nav-link { font-weight: 600; color: var(--text-main) !important; text-transform: uppercase; font-size: 14px; margin: 0 12px; transition: color 0.3s; }
.nav-link:hover, .nav-link.active { color: var(--accent-color) !important; }

/* Slider Hero */
.carousel-item { height: 65vh; min-height: 450px; background-color: #000; position: relative; }
.carousel-item img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; } /* Opacità abbassata per far risaltare il testo */
.carousel-caption { bottom: 25%; z-index: 10; text-align: center; }
.carousel-caption h1 { font-size: 3.5rem; font-weight: 700; text-transform: uppercase; text-shadow: 2px 2px 10px #000; color: #fff; }
.carousel-caption p { font-size: 1.5rem; font-weight: 500; text-shadow: 1px 1px 8px #000; color: var(--accent-color); }

/* Modulo di Ricerca Homepage */
.search-box-wrapper { margin-top: -80px; position: relative; z-index: 20; }
.search-box { background: var(--bg-card); padding: 35px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); border-top: 5px solid var(--accent-color); }
.search-box label { font-weight: 700; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; }

/* Page Header (Pagine interne) */
.page-header { background: #0a0a0a; padding: 50px 0 30px; margin-bottom: 40px; border-bottom: 1px solid var(--border-color); }
.page-header h1 { font-weight: 700; text-transform: uppercase; color: #fff; }
.breadcrumb a { color: var(--accent-color); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-muted); }

/* Sidebar Filtri e Box generici */
.filter-sidebar, .filter-box { background: var(--bg-card); border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); padding: 20px; border: 1px solid var(--border-color); }
.filter-sidebar h4, .filter-box h4 { font-size: 1.2rem; font-weight: 700; text-transform: uppercase; border-bottom: 2px solid var(--accent-color); padding-bottom: 15px; margin-bottom: 20px; color: #fff; }

/* Toolbar Risultati */
.toolbar { background: var(--bg-card); padding: 15px 20px; border-radius: 10px; margin-bottom: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); border: 1px solid var(--border-color); }

/* Sezione Dinamica Testo */
.dynamic-content-section, .page-content-box { background-color: var(--bg-card); border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); padding: 40px; margin: 50px 0; line-height: 1.8; border: 1px solid var(--border-color); }
.section-title { font-weight: 700; text-transform: uppercase; margin-bottom: 40px; position: relative; padding-bottom: 15px; color: #fff; }
.section-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 60px; height: 4px; background-color: var(--accent-color); }

/* Footer */
footer.bg-dark { background-color: #050505 !important; border-top: 3px solid var(--accent-color); }
.hover-white:hover { color: var(--accent-color) !important; }

/* =========================================
   CARD VEICOLI
   ========================================= */
.car-card { border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.4); transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; background: var(--bg-card); margin-bottom: 30px; display: flex; flex-direction: column; height: 100%; position: relative; }
.car-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.8); border-color: var(--accent-color); }
.car-image-wrapper { position: relative; padding-top: 66.66%; overflow: hidden; background: #000; }
.car-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: opacity 0.3s; }
.car-card:hover .car-image { opacity: 1; }
.car-badge { position: absolute; top: 15px; left: 15px; background: var(--accent-color); color: #000; padding: 5px 12px; font-size: 12px; font-weight: bold; border-radius: 4px; z-index: 2; text-transform: uppercase; }
.car-price { font-size: 1.5rem; font-weight: 700; color: var(--accent-color); margin-bottom: 0; }
.car-features { font-size: 12.5px; color: var(--text-muted); border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: 15px; display: flex; justify-content: space-between; }

/* =========================================
   CARD SERVIZI
   ========================================= */
.service-card { border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.4); transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; background: var(--bg-card); height: 100%; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.8); border-color: var(--accent-color); }
.service-card-img { height: 200px; width: 100%; object-fit: cover; border-bottom: 3px solid var(--accent-color); opacity: 0.9; }
.service-card-body { padding: 25px; text-align: center; }
.service-card-title { font-weight: 700; font-size: 1.2rem; margin-bottom: 15px; color: #fff; }

/* =========================================
   DETTAGLIO SINGOLO VEICOLO (veicolo.php)
   ========================================= */
.vehicle-title-box { background: var(--bg-card); padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); margin-bottom: 30px; border: 1px solid var(--border-color); }
.vehicle-price-tag { font-size: 2.2rem; font-weight: 800; color: var(--accent-color); text-align: right; }

.main-gallery-view { border-radius: 10px; overflow: hidden; background: #000; margin-bottom: 15px; position: relative; padding-top: 66.66%; border: 1px solid var(--border-color); }
.main-gallery-view img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }

.gallery-thumbs { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.gallery-thumbs img { flex: 0 0 auto; width: 80px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: 0.4; transition: opacity 0.2s, border 0.2s; border: 2px solid transparent; }
.gallery-thumbs img:hover, .gallery-thumbs img.active-thumb { opacity: 1; border-color: var(--accent-color); }

.gallery-thumbs::-webkit-scrollbar { height: 6px; }
.gallery-thumbs::-webkit-scrollbar-track { background: var(--bg-main); border-radius: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

.specs-list { padding: 0; margin: 0; list-style: none; }
.specs-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; }
.specs-list li span.spec-label { color: var(--text-muted); font-weight: 500; }
.specs-list li span.spec-value { font-weight: 700; color: #fff; text-align: right; }

.nav-tabs { border-bottom: 1px solid var(--border-color); }
.nav-tabs .nav-link { color: var(--text-muted); font-weight: 600; border: none; padding: 15px 25px; text-transform: uppercase; font-size: 0.9rem; }
.nav-tabs .nav-link:hover { border-color: transparent; color: #fff; }
.nav-tabs .nav-link.active { color: var(--accent-color); border-bottom: 3px solid var(--accent-color); background: transparent; }

.equipment-list { list-style: none; padding: 0; margin: 0; }
.equipment-list li { padding: 8px 0; border-bottom: 1px dashed var(--border-color); font-size: 0.95rem; color: var(--text-main); }
.equipment-list li i { color: var(--accent-color); margin-right: 10px; }