/* =========================================================
   FONT & BASE
========================================================= */
:root {
  --blue-900: #0b2a4a;
  --blue-700: #003366;
  --blue-500: #1f5a99;
  --gray-100: #f5f7fa;
  --gray-800: #2b2b2b;
  --lime: #b3ec40;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* LIGHT MODE (default) */
body.light-mode {
  background: #ffffff;
  color: #1c1c1c;
}

/* DARK MODE SOFT (D1) */
body.dark-mode {
  background: #1a1a1a;
  color: #e1e1e1;
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
  background: var(--blue-700) !important;
  padding: 12px 20px;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: #ffffff !important;
  transition: 0.2s;
}

.navbar-nav .nav-link:hover {
  color: var(--lime) !important;
}

#theme-toggle {
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  background: #ffffff;
  color: var(--blue-700);
  border-radius: 6px;
  padding: 4px 10px;
  transition: 0.3s;
}

#theme-toggle:hover {
  transform: rotate(360deg);
}

/* =========================================================
   HERO A - Minimal Corporate
========================================================= */
.hero-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 64px 16px;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  opacity: 0.45; /* era 0.25 → più visibile */
  filter: brightness(70%) saturate(95%);
}

/* Velatura Light */
body.light-mode .hero-veil {
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(1px);
  position: absolute;
  inset: 0;
  z-index:-2;
}

/* Velatura Dark */
body.dark-mode .hero-veil {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  position: absolute;
  inset: 0;
  z-index:-2;
}

.hero-content h1 {
  color: var(--blue-900);
  font-weight: 700;
}

body.dark-mode .hero-content h1 {
  color: #ffffff;
}

.hero-content .lead {
  font-weight: 600;
  color: var(--blue-900);
}

body.dark-mode .hero-content .lead {
  color: #f5f5f5;
}

/* CTA Lime */
.hero-content .btn {
  background: var(--lime);
  color: #003000;
  font-weight: 600;
  border: none;
  border-radius: .55rem;
  padding: .85rem 1.5rem;
  transition: 0.2s;
}

body.dark-mode .hero-content .btn {
  box-shadow: 0 0 10px rgba(41, 61, 2, 0.35);
}

.hero-content .btn:hover {
  filter: brightness(0.85);
  transform: translateY(-2px);
}

/* =========================================================
   SERVIZI (CARDS)
========================================================= */
.service-card {
  border: none;
  border-radius: 12px;
  min-height: 120px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: 0.18s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
}

.service-card .card-title {
  color: #1c1c1c;
  font-weight: 600;
}

body.dark-mode .service-card {
  background: #2b2b2b;
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
}

body.dark-mode .service-card .card-title {
  color: #f5f5f5;
}

/* =========================================================
   FORM / CTA
========================================================= */
#quote-request h2 {
  font-weight: 700;
  color: var(--blue-900);
}

body.dark-mode #quote-request h2 {
  color: #ffffff;
}

.form-label {
  font-weight: 600;
}

.form-control {
  border-radius: .6rem;
  border: 1px solid #d9e1ea;
  padding: .75rem .9rem;
}

.form-control:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 .2rem rgba(31,90,153,.15);
}

/* FORM Dark Mode FIX */
body.dark-mode #quote-request {
  background: #2b2b2b !important;
  color: #ffffff !important;
  border-radius: 12px;
}

body.dark-mode .form-control {
  background: #3a3a3a !important;
  color: #ffffff !important;
  border: 1px solid #555 !important;
}

.btn-primary {
  background: var(--blue-700);
  border-color: var(--blue-700);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--blue-500);
  border-color: var(--blue-500);
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  background: var(--blue-700);
  color: #ffffff;
  padding: 18px;
  text-align: center;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 992px) {
  .hero-content h1 { font-size: 2.2rem; }
  .hero-content .lead { font-size: 1.05rem; }
}

@media (max-width: 576px) {
  .hero-content h1 { font-size: 1.9rem; }
  .hero-content .lead { font-size: 1rem; }
}
/* ========== DARK MODE – FIX TESTI GLOBALI ========== */

/* Titoli, paragrafi, liste, testo comune */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode small,
body.dark-mode label,
body.dark-mode .card-text,
body.dark-mode .lead {
  color: #f5f5f5 !important;
}

/* Override classi Bootstrap “scure” che restano tali in dark */
body.dark-mode .text-dark,
body.dark-mode .text-body,
body.dark-mode .text-secondary,
body.dark-mode .card-title {
  color: #f5f5f5 !important;
}
body.dark-mode .text-muted {
  color: #cfcfcf !important;
}

/* Link (tranne i bottoni) */
body.dark-mode a:not(.btn) {
  color: #eaeaea !important;
}
body.dark-mode a:hover:not(.btn) {
  color: var(--lime) !important;
}

/* Tabelle (se presenti) */
body.dark-mode th,
body.dark-mode td {
  color: #f0f0f0 !important;
}

/* Card: assicura che il testo interno non resti scuro */
body.dark-mode .card,
body.dark-mode .card-body {
  color: #f5f5f5 !important;
}

/* Placeholder dei campi in dark */
body.dark-mode ::placeholder {
  color: #cfcfcf !important;
  opacity: 1; /* Firefox */
}

/* Label e helper sotto i campi */
body.dark-mode .form-text,
body.dark-mode .form-label {
  color: #e6e6e6 !important;
}

/* Google Translate widget (se lo usi) */
body.dark-mode #google_translate_element,
body.dark-mode #google_translate_element * {
  color: #f0f0f0 !important;
}

/* ========== Video background: più visibile ========== */
.bg-video {
  opacity: 0.55;              /* era 0.45 → ancora più visibile */
  filter: brightness(75%) saturate(100%);
}

/* Velatura dark leggermente meno coprente */
body.dark-mode .hero-veil {
  background: rgba(0,0,0,0.40);
}
