/**
 * HYDROMAVERICH S.R.L. - Official Industrial Tech Design System
 * ----------------------------------------------------------------
 * Conforme alle specifiche grafiche di SPEC_HYDROMAVERICH_WEB.md
 */

:root {
  --hm-green: #00B85C;
  --hm-green-hover: #00944A;
  --hm-green-soft: #ECFDF5;
  --hm-green-glow: rgba(0, 184, 92, 0.25);
  
  --hm-blue: #0284C7;
  --hm-blue-soft: #F0F9FF;
  
  --hm-dark: #0F172A;
  --hm-darker: #090D16;
  --hm-dark-card: #1E293B;
  
  --hm-light: #F8FAFC;
  --hm-border: #E2E8F0;
  --hm-border-dark: #334155;
  
  --hm-text-dark: #0F172A;
  --hm-text-muted: #64748B;
  --hm-text-light: #F8FAFC;
  
  --hm-radius-sm: 6px;
  --hm-radius: 12px;
  --hm-radius-lg: 20px;
  
  --hm-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --hm-shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --hm-shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.15);
  --hm-shadow-glow: 0 0 30px rgba(0, 184, 92, 0.2);
}

/* Global Reset & Base */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--hm-text-dark);
  background-color: #FFFFFF;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .tech-heading {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Navbar */
.navbar-hm {
  background: rgba(8, 13, 26, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem 0;
  transition: all 0.3s ease;
  z-index: 1030;
}

/* Brand Logo & Typography */
.navbar-hm .navbar-brand {
  padding: 0;
  margin-right: 0.75rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-hm .nav-utility-cluster {
  flex-shrink: 0;
}

.navbar-hm .navbar-brand .brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.brand-text-block .brand-title {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.brand-text-block .brand-sub {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--hm-green) !important;
  opacity: 0.95;
}

@media (min-width: 992px) {
  .navbar-hm {
    padding: 0.45rem 0;
  }
  .navbar-hm .navbar-brand .brand-logo {
    height: 48px;
  }
}

@media (min-width: 1200px) {
  .navbar-hm {
    padding: 0.5rem 0;
  }
  .navbar-hm .navbar-brand .brand-logo {
    height: 52px;
  }
  .navbar-hm .navbar-brand:hover .brand-logo {
    transform: scale(1.03);
    filter: drop-shadow(0 3px 10px rgba(0, 184, 92, 0.4));
  }
}

@media (min-width: 1400px) {
  .navbar-hm .navbar-brand .brand-logo {
    height: 54px;
  }
}

/* Nav Links Styling - Calibrato per non strabordare mai su schermi 1920 con scaling Windows */
.navbar-hm .nav-link {
  color: #CBD5E1 !important;
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  padding: 0.38rem 0.52rem !important;
  margin: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

@media (min-width: 1400px) {
  .navbar-hm .nav-link {
    font-size: 0.9rem;
    padding: 0.42rem 0.68rem !important;
    gap: 6px;
  }
}

.navbar-hm .nav-link i {
  font-size: 0.88rem;
  opacity: 0.8;
  color: var(--hm-green);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar-hm .nav-link:hover {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.navbar-hm .nav-link:hover i {
  opacity: 1;
  transform: scale(1.15);
}

.navbar-hm .nav-link.active {
  color: #FFFFFF !important;
  background: rgba(0, 184, 92, 0.18);
  border: 1px solid rgba(0, 184, 92, 0.35);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 184, 92, 0.15);
}

.navbar-hm .nav-link.active i {
  color: #00E676 !important;
  opacity: 1;
}

/* Evidenza speciale per "Trova Officina" */
.navbar-hm .nav-link-workshop {
  background: rgba(0, 184, 92, 0.12) !important;
  border: 1px solid rgba(0, 184, 92, 0.4) !important;
  color: #00E676 !important;
  font-weight: 600 !important;
}

.navbar-hm .nav-link-workshop:hover {
  background: var(--hm-green) !important;
  border-color: var(--hm-green) !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 12px rgba(0, 184, 92, 0.35);
}

.navbar-hm .nav-link-workshop:hover i {
  color: #FFFFFF !important;
}

/* Hamburger Toggler Button */
.navbar-toggler {
  z-index: 1040;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--hm-green) !important;
  box-shadow: 0 0 0 2px rgba(0, 184, 92, 0.4);
}

/* Area B2B Button */
.btn-nav-b2b {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(0, 184, 92, 0.45);
  color: #FFFFFF !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-nav-b2b:hover {
  background: rgba(0, 184, 92, 0.18);
  border-color: var(--hm-green);
  color: #00E676 !important;
  box-shadow: 0 0 12px rgba(0, 184, 92, 0.3);
  transform: translateY(-1px);
}

.btn-nav-utility {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.75rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-nav-utility:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

/* Language Switcher Segmented Pill */
.lang-segmented-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 2px;
}

.lang-segmented-pill .lang-pill-item {
  color: #94A3B8;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 18px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lang-segmented-pill .lang-pill-item:hover {
  color: #FFFFFF;
}

.lang-segmented-pill .lang-pill-item.active {
  background: var(--hm-green);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 184, 92, 0.4);
}

.btn-nav-cta {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.36rem 0.82rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 184, 92, 0.3);
}

/* Mobile Drawer Stile App Nativa (mantiene la bellezza su mobile) */
@media (max-width: 1199.98px) {
  #navbarMain {
    background: rgba(10, 15, 29, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.75rem;
    padding: 1rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7);
  }
  #navbarMain .navbar-nav {
    margin-bottom: 1rem !important;
  }
  #navbarMain .nav-link {
    padding: 0.65rem 1rem !important;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
  }
  #navbarMain .nav-utility-cluster {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* Primary Button */
.btn-hm-primary {
  background-color: var(--hm-green);
  color: #FFFFFF;
  font-weight: 600;
  border: none;
  padding: 0.7rem 1.6rem;
  border-radius: var(--hm-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 184, 92, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-hm-primary:hover {
  background-color: var(--hm-green-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 92, 0.4);
}

.btn-hm-outline {
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: var(--hm-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-hm-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-hm-outline-dark {
  background-color: transparent;
  color: var(--hm-dark);
  border: 1px solid var(--hm-border);
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: var(--hm-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-hm-outline-dark:hover {
  background-color: var(--hm-light);
  border-color: var(--hm-dark);
  color: var(--hm-dark);
}

/* Hero Section */
.hero-industrial {
  position: relative;
  background: radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(0, 184, 92, 0.15) 0%, transparent 50%),
              var(--hm-dark);
  color: var(--hm-text-light);
  padding: 6rem 0 5rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-industrial::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 184, 92, 0.12);
  border: 1px solid rgba(0, 184, 92, 0.35);
  color: #4ADE80;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 30px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.1rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-title span.text-highlight {
  color: var(--hm-green);
  background: linear-gradient(135deg, #00D26A 0%, #00B85C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: #94A3B8;
  max-width: 620px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Render / Machine Graphic Card */
.machine-render-frame {
  position: relative;
  background: linear-gradient(145deg, #1E293B, #0F172A);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--hm-radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--hm-shadow-lg), var(--hm-shadow-glow);
  text-align: center;
}

.machine-render-frame .glow-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--hm-green);
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Stats Section */
.stats-bar {
  background: #0B1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.5rem 0;
}

.stat-item {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 1.5rem;
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #FFFFFF;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-number.text-nowrap {
  white-space: nowrap;
  font-size: clamp(1.15rem, 1.6vw, 1.75rem);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
}

.stat-number.green { color: var(--hm-green); }
.stat-number.blue { color: var(--hm-blue); }

.stat-desc {
  font-size: 0.9rem;
  color: #94A3B8;
  font-weight: 500;
}

/* Cards & Surfaces */
.hm-card {
  background: #FFFFFF;
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.hm-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hm-shadow-md);
  border-color: #CBD5E1;
}

.hm-card.card-featured {
  border-top: 4px solid var(--hm-green);
}

.hm-card.card-blue {
  border-top: 4px solid var(--hm-blue);
}

/* Product Card */
.prod-card-thumb {
  background: #F1F5F9;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.prod-card-thumb .prod-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.prod-card-body {
  padding: 1.5rem;
}

.prod-app-badge {
  display: inline-block;
  background: #E2E8F0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Section Containers */
.section-light {
  background-color: #FFFFFF;
  padding: 5rem 0;
}

.section-soft {
  background-color: var(--hm-light);
  padding: 5rem 0;
  border-top: 1px solid var(--hm-border);
  border-bottom: 1px solid var(--hm-border);
}

.section-dark {
  background-color: var(--hm-dark);
  color: #FFFFFF;
  padding: 5rem 0;
}

/* ROI Calculator Component */
.roi-calculator-box {
  background: #FFFFFF;
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow-md);
  padding: 2.5rem;
}

.roi-slider-group {
  margin-bottom: 2rem;
}

.roi-slider-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--hm-dark);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.roi-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #E2E8F0;
  outline: none;
  -webkit-appearance: none;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hm-green);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 184, 92, 0.4);
}

.roi-result-card {
  background: linear-gradient(145deg, #0F172A, #1E293B);
  color: #FFFFFF;
  border-radius: var(--hm-radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.roi-result-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(0, 184, 92, 0.3) 0%, transparent 70%);
}

.roi-big-value {
  font-size: 2.8rem;
  font-weight: 800;
  color: #00D26A;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.1;
  margin: 0.5rem 0;
}

/* Technical Specs Table */
.table-tech-specs {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius-sm);
  overflow: hidden;
}

.table-tech-specs th {
  background: #0F172A;
  color: #FFFFFF;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.table-tech-specs td {
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--hm-border);
}

.table-tech-specs tr:nth-child(even) td {
  background: #F8FAFC;
}

.table-tech-specs tr:last-child td {
  border-bottom: none;
}

.table-tech-specs td.spec-name {
  font-weight: 600;
  color: var(--hm-dark);
  width: 35%;
}

.table-tech-specs td.spec-val {
  color: #334155;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

/* Floating WhatsApp Button */
.whatsapp-floating {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #25D366;
  color: #FFFFFF;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.whatsapp-floating:hover {
  color: #FFFFFF;
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* Footer */
.footer-hm {
  background-color: var(--hm-darker);
  color: #94A3B8;
  padding: 4.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-hm h5 {
  color: #FFFFFF;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.footer-hm ul {
  list-style: none;
  padding-left: 0;
}

.footer-hm ul li {
  margin-bottom: 0.6rem;
}

.footer-hm ul li a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer-hm ul li a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.3rem;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem 0;
  }
  .stat-item:last-child {
    border-bottom: none;
  }
}

.hover-shadow {
  transition: all 0.25s ease;
}
.hover-shadow:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
}
.hover-success:hover {
  color: var(--hm-green) !important;
}

/* ==========================================================================
   Fail-Safe: Disattivazione Overlay e Garanzia Assoluta Cliccabilità Interfaccia
   ========================================================================== */
html, body {
  pointer-events: auto !important;
}

/* Qualsiasi backdrop non attivo viene rimosso dal flusso dei clic */
.modal-backdrop:not(.show),
.offcanvas-backdrop:not(.show),
div[class*="backdrop"]:not(.show) {
  display: none !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* Sezione Amministrazione B2B: Assicura che navigazione, dropdown e tabelle ricevano sempre i clic */
.card,
.table-responsive,
.dropdown,
.dropdown-menu,
#adminHubTabsContent,
#adminHubTabsContent .tab-pane,
.btn,
button,
a,
input,
select,
textarea {
  pointer-events: auto !important;
}

.dropdown-menu {
  z-index: 1060 !important;
}

.dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
